#include<stdio.h>
#include<algorithm>
#define M 100005
using namespace std;
int n,a[M],ans;
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;++i) scanf("%d",a+i);
	sort(a+1,a+n+1),ans=n;
	for(int i=1,l=1;i<=n;++i){
		if(a[l]==a[i]);
		else --ans,++l;
	}
	printf("%d",ans);
}